package com.example.testdemo.scenes;

import org.andengine.engine.camera.BoundCamera;
import org.andengine.entity.scene.background.Background;
import org.andengine.entity.text.Text;
import org.andengine.util.color.Color;

import com.example.testdemo.TankGameActivity;
import com.example.testdemo.manager.CamerasManager;
import com.example.testdemo.manager.ResourcesManager;
import com.example.testdemo.manager.ScenesManager;
import com.example.testdemo.resources.SplashResources;

public class SplashScene extends BaseScene {
	@SuppressWarnings("unused")
    private final String TAG = SplashScene.class.getSimpleName();

	private TankGameActivity mActivity;
	private SplashResources mResources;
	private BoundCamera mBoundCamera;

	private Text mText;

	@Override
	public void createScene(TankGameActivity activity) {
		mActivity = activity;
		mBoundCamera = (BoundCamera) CamerasManager.getInstance().getCamera(
		        CamerasManager.CAMERA_ZOOM);
		mResources = (SplashResources) ResourcesManager.getInstance()
		        .getResources(ScenesManager.SCENE_SPLASH);
		setBackground(new Background(Color.WHITE));
	}

	@Override
	public void populateScene() {
		mText = new Text(mBoundCamera.getWidth() / 2 - 70,
		        mBoundCamera.getHeight() / 2 - 10, mResources.mFont,
		        "MPC Game", mActivity.getVertexBufferObjectManager());
		mText.setColor(Color.BLUE);
		attachChild(mText);
	}

	@Override
	public void resetScene() {

	}

	@Override
	public void disposeScene() {
		
	}

}
